package com.coldchain.cys.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.Min;

/**
 * <p>
 * 
 * </p>
 *
 * @author tianpeng
 * @since 2018-08-28
 */
@TableName("t_car")
public class Car implements Serializable {
	
	
	@TableField(exist=false)
	private CarDriver carDriver ; //司机


    /**
     * 车辆管理表
     */
	@TableId(value="id", type= IdType.UUID)
	private String id;
	
	/**
	 * 承运商id
	 */
	private String cid ;
    /**
     * 品牌id
     */
	@Min(value = 0,message = "请选择车辆品牌")
	private Long brandid;
    /**
     * 车辆型号
     */
	@Min(value = 0,message = "请选择车辆类型")
	private Integer model;
    /**
     * 车牌号
     */
	@NotEmpty(message = "车牌号不能为空")
	private String plateNumber;
	

	
	/**
	 * 设备编号
	 */
	@NotEmpty(message = "设置编号不能为空")
	private String deviceNumber ; 
	
	/**
	 * 采集时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date collectionTime ; 
	
	/**
	 * 温度一
	 */
	private BigDecimal temperature01 ;
	
	/**
	 * 温度二
	 */
	private BigDecimal temperature02 ; 
	
	/**
	 * 湿度
	 */
	private BigDecimal humidity ;
	
	/**
	 * 电量
	 */
	private BigDecimal power ; 
	
	/**
	 * 信号强度
	 */
	private BigDecimal xinghaoqiangdu ;
	/**
     * 保险日期开始时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date safeBegin;
    /**
     * 保险日期结束时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date safeEnd;
    /**
     * 年检日期开始时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date yearInspectionBegin;
    /**
     * 年检日期结束时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date yearInspectionEnd;
    /**
     * 车辆通行证图片
     */
	private String passProve;
    /**
     * 交易保险单
     */
	private String tradePolicy;
    /**
     * 商业保险单
     */
	private String businessPolicy;
    /**
     * 乐观锁
     */
	@Version
	private Integer version;
    /**
     * 创建时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createtime;
    /**
     * 审核状态 0正在审核 1审核通过 2审核驳回
     */
	private Integer status;
    /**
     * 是否启用 0启动 -1禁用
     */
	private Integer isuse;



	
	/**
	 * 纬度
	 */
	private String lat ; 
	/**
	 * 经度
	 */
	private String lon ;

	public CarDriver getCarDriver() {
		return carDriver;
	}

	public void setCarDriver(CarDriver carDriver) {
		this.carDriver = carDriver;
	}


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCid() {
		return cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	public Long getBrandid() {
		return brandid;
	}

	public void setBrandid(Long brandid) {
		this.brandid = brandid;
	}

	public Integer getModel() {
		return model;
	}

	public void setModel(Integer model) {
		this.model = model;
	}

	public String getPlateNumber() {
		return plateNumber;
	}

	public void setPlateNumber(String plateNumber) {
		this.plateNumber = plateNumber;
	}

	public String getDeviceNumber() {
		return deviceNumber;
	}

	public void setDeviceNumber(String deviceNumber) {
		this.deviceNumber = deviceNumber;
	}

	public Date getCollectionTime() {
		return collectionTime;
	}

	public void setCollectionTime(Date collectionTime) {
		this.collectionTime = collectionTime;
	}

	public BigDecimal getTemperature01() {
		return temperature01;
	}

	public void setTemperature01(BigDecimal temperature01) {
		this.temperature01 = temperature01;
	}

	public BigDecimal getTemperature02() {
		return temperature02;
	}

	public void setTemperature02(BigDecimal temperature02) {
		this.temperature02 = temperature02;
	}

	public BigDecimal getHumidity() {
		return humidity;
	}

	public void setHumidity(BigDecimal humidity) {
		this.humidity = humidity;
	}

	public BigDecimal getPower() {
		return power;
	}

	public void setPower(BigDecimal power) {
		this.power = power;
	}

	public BigDecimal getXinghaoqiangdu() {
		return xinghaoqiangdu;
	}

	public void setXinghaoqiangdu(BigDecimal xinghaoqiangdu) {
		this.xinghaoqiangdu = xinghaoqiangdu;
	}

	public Date getSafeBegin() {
		return safeBegin;
	}

	public void setSafeBegin(Date safeBegin) {
		this.safeBegin = safeBegin;
	}

	public Date getSafeEnd() {
		return safeEnd;
	}

	public void setSafeEnd(Date safeEnd) {
		this.safeEnd = safeEnd;
	}

	public Date getYearInspectionBegin() {
		return yearInspectionBegin;
	}

	public void setYearInspectionBegin(Date yearInspectionBegin) {
		this.yearInspectionBegin = yearInspectionBegin;
	}

	public Date getYearInspectionEnd() {
		return yearInspectionEnd;
	}

	public void setYearInspectionEnd(Date yearInspectionEnd) {
		this.yearInspectionEnd = yearInspectionEnd;
	}

	public String getPassProve() {
		return passProve;
	}

	public void setPassProve(String passProve) {
		this.passProve = passProve;
	}

	public String getTradePolicy() {
		return tradePolicy;
	}

	public void setTradePolicy(String tradePolicy) {
		this.tradePolicy = tradePolicy;
	}

	public String getBusinessPolicy() {
		return businessPolicy;
	}

	public void setBusinessPolicy(String businessPolicy) {
		this.businessPolicy = businessPolicy;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getIsuse() {
		return isuse;
	}

	public void setIsuse(Integer isuse) {
		this.isuse = isuse;
	}


	public String getLat() {
		return lat;
	}

	public void setLat(String lat) {
		this.lat = lat;
	}

	public String getLon() {
		return lon;
	}

	public void setLon(String lon) {
		this.lon = lon;
	}
}
